package com.wzapp.sitposture.authentication.service;

import com.wzapp.sitposture.authentication.pojo.param.ValidMobileParam;
import com.wzapp.sitposture.authentication.pojo.view.OssDTO;
import com.wzapp.sitposture.authentication.pojo.view.OssRequest;
import com.wzapp.sitposture.authentication.pojo.view.SmsCode;
import com.wzapp.sitposture.common.error.CustomizedException;

import java.util.List;

/**
 * Created by qianglong on 2018/1/23.
 */
public interface AuthenticationService {

    /**
     * 功能: 获取OSS配置信息<br/>
     *
     * @param ossRequest
     * @return java.util.List<com.wzapp.sitposture.authentication.view.OssDTO>
     * @author ql
     * @create 2018/5/7 19:46
     **/
    List<OssDTO> requestOss(OssRequest ossRequest) throws CustomizedException;

    /**
     * 功能: 获取短信验证码<br/>
     *
     * @param mobile 手机号码
     * @param type   操作类型 register 注册 password 找回密码 bindMobile 绑定手机号码
     * @return com.ql.authentication.backup.SmsCode
     * @author ql
     * @create 2018/5/7 19:47
     **/
    SmsCode fetchByMobile(String mobile, String type) throws Exception;

    /**
     * 功能: 验证手机号 <br/>
     *
     * @param validMobileParam 手机号验证参数
     * @return Boolean
     * @author ql
     * @create 2018/5/7 19:47
     **/
    Boolean validMobileCode(ValidMobileParam validMobileParam) throws Exception;

    /**
     * 校验验证码
     *
     * @param mobile 手机号码<br/>
     * @param code   验证码<br/>
     * @return
     */
    boolean verifyCode(String mobile, String code);
    /**
     * 功能: 清除验证码<br/>
     *
     * @author qianglong
     * @create 2019/8/4 14:58
     * @param mobile
     * @return void
     **/
    void removeRedisCode(String mobile);
}
